package hr.entity.DO;

import hr.utils.CommonUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class DepartmentEmployeeDO {
    private Long departmentId;           // 部门ID
    private String departmentName;      // 部门名称
    private Long parentDepartmentId;     // 上级部门ID
    private Integer departmentStatus;    // 部门状态（正常、异常、未知状态）
    private Long createTime;            // 创建时间
    private String createTimeStr;            // 创建时间字符串形式
    private Long employeeId;             // 员工ID
    private String employeeName;        // 员工姓名
    private String employeePhone;       // 员工电话
    private String employeeEmail;       // 员工邮箱
    List<DepartmentEmployeeDO> children;

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
        createTimeStr = CommonUtils.convertTimestampToYMDAndTime(createTime);
    }
}